package com.zyc.decorateMode.example;

/**
 * @author zyc
 * @create 2022--06--15 16:43
 */
public abstract class Decorator extends Component{
    protected Component component;

    public void setComponent(Component component) {
        this.component = component;
    }

    @Override
    public void operation() {
        if (component != null) {
            component.operation();;
        }
    }
}
